jQuery(function(){
	jQuery("#image-carousel").carouFredSel({
		auto : {
			play: 			false,
			pauseDuration: 	3500,
			pauseOnHover:	true
		},
		scroll : {
			easing : "easeOutSine",
			duration: 1000
		},
		items: 1,
		direction: "up",
		prev : {   
			button  : "#web-image-carousel-prev"
		},
		next : {
			button  : "#web-image-carousel-next"
		}
	});	
    
    jQuery("#image-carousel-2").carouFredSel({
		auto : {
			play: 			false,
			pauseDuration: 	5500,
			pauseOnHover:	true
		},
		scroll : {
			easing : "easeOutSine",
			duration: 1000
		},
		items: 2,
		direction: "up",
		prev : {   
			button  : "#web-image-carousel-prev-2"
		},
		next : {
			button  : "#web-image-carousel-next-2"
		}
	});
    
    /*jQuery("#image-carousel-3").carouFredSel({
		auto : {
			play: 			true,
			pauseDuration: 	5000,
			pauseOnHover:	true
		},
		scroll : {
			easing : "easeOutSine",
			duration: 1000
		},
		items: 2,
		direction: "bottom",
		prev : {   
			button  : "#web-image-carousel-prev-3"
		},
		next : {
			button  : "#web-image-carousel-next-3"
		}
	});*/
});

jQuery(function(){
	jQuery.fn.supersized.options = {  
		startwidth: 2000,  
		startheight: 1250,
		vertical_center: 1,
		slideshow: 1,
		navigation: 0,
		transition: 0,
		pause_hover: 0,
		slide_counter: 1,
		slide_captions: 0,
		slide_interval: 5000,
        performance: 3
	};
	jQuery('#web_supersize').supersized();
});

jQuery(function(){
	/*var animation = true;
	var menuTimeout = null;
	setTimeout(mmove,1000);
	
	var fclear = function(){
		clearTimeout(menuTimeout);
		menuTimeout = setTimeout(mstop,5000);
	}
	var fmmove = function(event){
		jQuery('.web-nav').stop().animate(
			{"top": "30px"}
		);
		jQuery(this).unbind(event);
	}
	
	function mmove(){
		jQuery(document).bind('mousemove', fclear);
		jQuery(document).bind('mousemove', fmmove);
	}

	function mstop(){
		if(animation){
			clearTimeout(menuTimeout);
			jQuery('.web-nav').stop().animate(
				{"top": "-65px"}
			);
			jQuery(document).bind('mousemove', fmmove);
		}
	}

	jQuery('div.web-sitenav-1 ul.level-1 li').mouseover(function(event){
		animation = false;
	}).mouseout(function(event){
		animation = true;
	});
    */
});

jQuery(function(){
	if(!jQuery.browser.msie){
        jQuery("#web-linkblock").hover(
            function(){       
                var d = jQuery("a.activeslide");
                if(d.attr('rel')){
                    //alert('1');
                    jQuery(this).css('cursor','pointer');
                }else{
                    // alert('2');
                    jQuery(this).css('cursor','default');
                }
            },
            function(){
                
            }
        );
       
		jQuery("#web-linkblock").click(function(event){
			//if(event.currentTarget == event.target){
				var c = jQuery("a.activeslide");
                if(c.attr('rel')){
                    if(c){
    					if(c.attr("target")=="_blank"){
    						window.open(c.attr("rel"));
    					} else {
    						document.location.href = c.attr("rel");
    					}
    					return false;
    				}
                }
				
			//}
		});
	}
});
