jQuery.noConflict();

(function($) {

	
		setupSupplierNewsList = function(){

			$('ul.suppliers-news-list li').hover(function() {

                                var news_id_full = $(this).attr("id");
				var news_id = news_id_full.split("-");
				//news_id[3]
				
				
				var current_news_detail_full = $("ul.suppliers-news-details li:visible").attr("id");
				var current_news_detail = current_news_detail_full.split("-");
				//current_news_detail[4]
				

				
				if (current_news_detail[4] != news_id[3]) {		
					$("#" + current_news_detail_full).css("display", "none");
					$("#supplier-news-detail-id-" + news_id[3]).css("display", "block");
					
					$("ul.suppliers-news-list li").each( function() {
						 var tmp_id = $(this).attr("id");
						 $("#" + tmp_id).css("background-color", "#ffffff");
					});
					
					$("#supplier-news-id-" + news_id[3]).css("background-color", "#efefef");
				}

				
		
			});			
                    }
	
			$(document).ready(function(){


				$("a[rel^='prettyPhoto']").prettyPhoto({
					animationSpeed: 'normal', /* fast/slow/normal */
					padding: 40, /* padding for each side of the picture */
					opacity: 0.55, /* Value betwee 0 and 1 */
					showTitle: true, /* true/false */
					allowresize: true, /* true/false */
					counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
					theme: 'light_rounded' /* light_rounded / dark_rounded / light_square / dark_square */
				});
				
				
				$('.spotlight-content').cycle({
				    fx:      'turnDown',
				    delay:   0,
				    timeout: 8000,
				    cleartypeNoBg: true
				});
				
				
				$(".latest-supp-content").jCarouselLite({
					vertical: true,
					hoverPause:true,
					visible: 6,
					auto:2000,
					speed:2000
				});
	

                                $(".slideshow-front").cycle({
                                    fx:      'fade',
				    delay:   0,
				    timeout: 4000,
				    cleartypeNoBg: true
				});


				//suppliers news list
				setupSupplierNewsList();

								
//				$('#username').coolinput({
//					blurClass: 'form-text-hint',
//				    hint: 'username'
//				});
//
//				$('#password').coolinput({
//					blurClass: 'form-text-hint',
//				    hint: 'password'
//				});


			});

})(jQuery);




