jQuery.noConflict();
jQuery(function(){

	if( jQuery('.scroll-pane').length > 0 ) {
		jQuery('.scroll-pane').jScrollPane(); 
	}

	if ( jQuery("#pressSlide").length > 0 )
	{
		jQuery('#pressSlideButton').click (
			function()
			{
				jQuery("#pressSlide").stop().animate({top:'0px'},{queue:false,duration:250});
			}
		)
		jQuery('#pressSlide').mouseleave (
			function()
			{
				jQuery("#pressSlide").stop().animate({top:'-50px'},{queue:false,duration:250});
			}
		)
	}

	if ( jQuery("#pressSlide").length > 0 )
	{
		jQuery('#pressSlideButton').click (
		function()
		{
			if (jQuery('#pressSlide').is('.active'))
			{
				jQuery("#pressSlide").stop().animate({top:'-50px'},{queue:false,duration:250});
				jQuery("#pressSlide").removeClass('active')
			}
			else
			{
				jQuery("#pressSlide").stop().animate({top:'0px'},{queue:false,duration:250});
				jQuery("#pressSlide").addClass('active')
			}
		}
	)
	}
	
	jQuery('#share').click (
		function()
		{
			jQuery("#share").stop().animate({right:'0px'},{queue:false,duration:250});
		}
	)
	jQuery('#share').mouseleave (
		function()
		{
			jQuery("#share").stop().animate({right:'-80px'},{queue:false,duration:250});
		}
	)
	
	jQuery('#follow').click (
		function()
		{
			jQuery("#follow").stop().animate({right:'0px'},{queue:false,duration:250});
		}
	)
	
	jQuery('#follow').mouseleave (
		function()
		{
			jQuery("#follow").stop().animate({right:'-190px'},{queue:false,duration:250});
		}
	)
	
	 jQuery('#mainNav li').hover(
        function () {
            //show its submenu
            jQuery('ul', this).show();
 
        },
        function () {
            //hide its submenu
            jQuery('ul', this).hide();        
        }
    );
    
    if(jQuery('#countrySelect').length > 0) {
    
    	jQuery('#countrySelect').change(function() {
    		jQuery(location).attr('href', jQuery(this).val() );
    	});
    }
    
	if ( jQuery("#sizeSlide").length > 0 )
	{
		jQuery('#sizeSlideButton').click (
			function()
			{
				jQuery("#sizeSlide").stop().animate({top:'0px'},{queue:false,duration:250});
			}
		)
		jQuery('#sizeSlide').mouseleave (
			function()
			{
				jQuery("#sizeSlide").stop().animate({top:'-450px'},{queue:false,duration:250});
			}
		)
	}    
 
 
 if ( $("#videosSlide").length > 0 )
 {
 	$('#videosSlideButton').click (
 		function()
 		{
 			$("#videosSlide").stop().animate({top:'0px'},{queue:false,duration:250});
 		}
 	)
 	$('#videosSlide').mouseleave (
 		function()
 		{
 			$("#videosSlide").stop().animate({top:'-110px'},{queue:false,duration:250});
 		}
 	)
 }
	if ( jQuery(".scrollable").length > 0 )
	{
		jQuery(".scrollable").scrollable();
	}
    
}); 



