$(document).ready(function(){
		
		// slider or cycle
		// see more about this jQuery plugin at http://malsup.com/jquery/cycle/
		//
		// for easing effects go to http://gsgd.co.uk/sandbox/jquery/easing/ 
		$('#slider-images').cycle({
			fx:      'fade',// see more options at http://malsup.com/jquery/cycle/options.html
			timeout:  8000, // time of the rotation
			speed:   800,
			pager:  '.nav-thumbs', 
			pagerAnchorBuilder: function(idx, slide) { 
			return '<li><a href="#"><img src="' + slide.src + '" width="50" height="30"/></a></li>'; 
			} 
		});
	  
		// slide/cycle on the portfolio page
		$('#content-in-680-slide').cycle({
			fx:     'scrollHorz',// see more options at http://malsup.com/jquery/cycle/options.html
			timeout: 0,
			speed:   'fast',
			prev:    '#prevbtn',
			next:    '#nextbtn'
		});
	  
		// slide to (portfolio)
		$('#port-slide-1').click(function() { 
			$('#content-in-680-slide').cycle(0); 
			return false; 
		}); 
		$('#port-slide-2').click(function() { 
			$('#content-in-680-slide').cycle(1); 
			return false; 
		}); 
		$('#port-slide-3').click(function() { 
			$('#content-in-680-slide').cycle(2); 
			return false; 
		}); 
		$('#port-slide-4').click(function() { 
			$('#content-in-680-slide').cycle(3); 
			return false; 
		}); 
		 
		// Fade stuff(products page)
		$(".fade").fadeTo("slow", 0.6); // This sets the opacity of the thumbs to fade down to 20% when the page loads
	
		$(".fade").hover(function(){
			$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
		},function(){
			$(this).fadeTo("slow", 0.6); // This should set the opacity back to 20% on mouseout
		});
	
		// searchfield value more info @ http://mucur.name/system/jquery_example/
		$('#s').example('Search here');
		$('#s2').example('Email Sign Up');
	    
		// jquery dropdown menu more info @ http://users.tpg.com.au/j_birch/plugins/superfish/
        $('ul.sf-menu').superfish({ 
            delay:       500,               // delay on mouseout 
            animation:   {opacity:'show'},  // fade-in and slide-down animation 
            speed:       'fast'             // faster animation speed 
        }); 
        
		// submenu
		$('#subnav a').hover(function() { //mouse in
			var act = $(this).parent('li').attr('class');
				if(act == 'active'){
				// do nothing
				}else{	
				 $(this).animate({ paddingLeft: '14px' }, 400);
				}
		}, function() { //mouse out
			$(this).animate({ paddingLeft: 0 }, 400);
		});
	
		// fade the scroll to arrow
		$("#totop img").fadeTo("slow", 0.5); 
		$("#totop img").hover(function(){
				$(this).fadeTo("fast", 1.0); 
			},function(){
				$(this).fadeTo("fast", 0.5);
			});

		 // jQuery lightbox more info @ http://leandrovieira.com/projects/jquery/lightbox/
		 $('a.lb').lightBox();

	    /* pngfix, supersleight the jQuery version more info @ http://allinthehead.com/retro/338/supersleight-jquery-plugin */
	    $('#logo, #totop').supersleight();
		
});


