$(window).load(function() {

  //infoBtn
  var btn_info=$("#btn_info");
  $(window).resize(function() {
    checkInfoBtn();
  });  
  checkInfoBtn();  
  function checkInfoBtn(){
    var windowWidth=$(window).width();
    if(windowWidth < 1100){
      if($.browser.msie) btn_info.css({"display" : "none"}); 
      else btn_info.fadeOut(500);  
    }
    else{   
      if($.browser.msie) btn_info.css({"display" : "block"});  
      else btn_info.fadeIn(500);       
    }  
  }
  btn_info.hover(
    function () {
      btn_info.stop().animate({width: 200}, 300);
    },
    function () {
      btn_info.stop().animate({width: 72}, 300);
    }
  );
  
  //modelSelect
  $(".modelSelect li[class!=active] img").stop().animate({opacity: 0.3}, 750); 
  $(".modelSelect li[class!=active] img").hover(
    function () {
      $(this).stop().animate({opacity: 1}, 350);
    },
    function () {
      $(this).stop().animate({opacity: 0.3}, 350);
    }
  ); 
  
  /*
  //nivo slider
	$('#slider').nivoSlider({ 
		effect:'random',
		animSpeed:700,
		pauseTime:5000,
		directionNav:false, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:false, //1,2,3...
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
	*/
	
	//fancybox
	$('#gallery_thumbs a').fancybox({
		'transitionIn'      : 'none',
		'transitionOut'     : 'none',
		'titleShow'	        : true,
		'titlePosition'	    : 'inside'
	});
	
	//fancybox iframe
	$('#btn_content_infopaket, #btn_content_angebot, #btn_content_kontakt, #btn_info, .button').fancybox({ 
		'transitionIn'      : 'none',
		'transitionOut'     : 'none',
		'titleShow'	        : true,
		'titlePosition'     : 'inside',
    'type'              : 'iframe',
    'autoScale'         : false
	});
	
});