/**
 * jQuery Voting Function
 * @uthor Timo Helken
 * @copyright 2011 Interwall GmbH
 */

$(document).ready(function(){
    $('.voteCocktail').cocktailVoting();  
    
     
$("#winslide").css('width', '0px');
$("#milk").hide();
$("#milkhead").hide();
$("#milkheadtwo").hide();
$(".milkbtn").hide();
$("#closebtn").hide();
$("#winslide").hide();


function cover () {
$(".winbtn").hover(
                        function() {
                    $("#slidebtn a").addClass('hover');}
                        ,function () {
                            $("#slidebtn a").removeClass('hover');
                            //$(".winbtn").css('background', "url('/fileadmin/default/images/lasche_geschlossen.png')")
                        }
                    )}
                 
                 
     cover();               


function toggler() {
     if($("#winslide").hasClass("open")) {
            $("#winslide").removeClass("open").animate({
                width: "0px"}, {queue:false, duration: 1200, easing:'easeOutBounce'
                
            });
            $("#slidebtn a").removeClass('active');
            $(".milkbtn").hide();
            $(".winbtn").css('background'," url('/fileadmin/default/images/lasche_geschlossen.png') 0px 0px !important");
        }
        else {
            $("#winslide").show();
            $("#slidebtn a").addClass('active');
            $(".winbtn").css('background'," url('/fileadmin/default/images/lasche_geschlossen.png') 0 -559px !important");
            $("#winslide").addClass("open").animate({
                width: "562px"}, {queue:false, duration: 1200, easing:'easeOutBounce'
            });
            $(".milkbtn").fadeIn(50);
            
        }
}
	
        $("a.winbtn").click(function() { return false; });
        
    $("a.winbtn").click(function(e) {
        e.stopPropagation();
       toggler();
    })    
   
     $("#content").click(function(e) {
        e.stopPropagation();
        if($("#winslide").hasClass("open")) {
            $("#winslide").removeClass("open").animate({
                width: "0px"}, {queue:false, duration: 1200, easing:'easeOutBounce'
                
            });
            $("#slidebtn a").removeClass('active');
            $(".milkbtn").hide();
            $(".winbtn").css('background'," url('/fileadmin/default/images/lasche_geschlossen.png') 0px 0px !important");
        }
       
    })
    
    
    
    
    
    
});





Cufon.replace('.cufon',{hover:true});Cufon.replace('#topNavigation a',{hover:true});Cufon('.home h4',{textShadow:'0 1px #e6d193'});$(document).ready(function(){$("a#map").fancybox({'width':530,'height':500,'autoScale':false,'transitionIn':'none','transitionOut':'none','type':'iframe','overlayColor':'#000000'});$("a#empfehlen").fancybox({'width':528,'height':525,'autoScale':true,'transitionIn':'none','transitionOut':'none','type':'iframe','overlayColor':'#000000'});$("a#video-overlay").fancybox({'width' : 660, 'height' : 380, 'autoScale' : true,'transitionIn' : 'none','transitionOut' : 'none','type' : 'iframe','overlayColor' : '#000000'});$('.home h1').png();$('#licorWomen').png();jQuery.preLoadImages('fileadmin/default/images/pageBackgroundHomeAfter.jpg','fileadmin/default/images/licorWomenHome.png','fileadmin/default/images/homeHeadline.png');$('#cocktailCarousel').tinycarousel({duration:700});$('#backgroundOverlay').delay(700).fadeIn('slow');$('#licorWomen').delay(500).fadeIn('slow');$('.home h1').delay(500).fadeIn('slow');if($.browser.msie){}
if($.browser.msie){(function makeDiv2(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background-image':'none','filter':'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_1_24.png",sizingMethod="scale")'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#ieWrap').fadeIn(1700).delay(500).fadeOut(1700,function(){$(this).remove();makeDiv2();});})();(function makeDiv3(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background-image':'none','filter':'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_4_24.png",sizingMethod="scale")'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#ieWrap').fadeIn(1300).delay(1000).fadeOut(1300,function(){$(this).remove();makeDiv3();});})();(function makeDiv4(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background-image':'none','filter':'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_3_24.png",sizingMethod="scale")'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#ieWrap').fadeIn(1700).delay(1500).fadeOut(1700,function(){$(this).remove();makeDiv4();});})();(function makeDiv5(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background-image':'none','filter':'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_2_24.png",sizingMethod="scale")'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#ieWrap').fadeIn(1200).delay(2000).fadeOut(1200,function(){$(this).remove();makeDiv5();});})();(function makeDiv22(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background-image':'none','filter':'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_1_24.png",sizingMethod="scale")'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#ieWrap').fadeIn(1300).delay(750).fadeOut(2000,function(){$(this).remove();makeDiv22();});})();(function makeDiv25(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background-image':'none','filter':'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_2_24.png",sizingMethod="scale")'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#ieWrap').fadeIn(1250).delay(1900).fadeOut(1250,function(){$(this).remove();makeDiv25();});})();}
else{(function makeDiv6(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background':'url(http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_4_24.png) transparent no-repeat'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#blop').fadeIn(1700).delay(500).fadeOut(1700,function(){$(this).remove();makeDiv6();});})();(function makeDiv7(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background':'url(http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_3_24.png) transparent no-repeat'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#blop').fadeIn(1300).delay(1000).fadeOut(1300,function(){$(this).remove();makeDiv7();});})();(function makeDiv8(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background':'url(http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_1_24.png) transparent no-repeat'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#blop').fadeIn(1700).delay(1500).fadeOut(1700,function(){$(this).remove();makeDiv8();});})();(function makeDiv9(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background':'url(http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_2_24.png) transparent no-repeat'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#blop').fadeIn(1200).delay(2000).fadeOut(1200,function(){$(this).remove();makeDiv9();});})();(function makeDiv18(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background':'url(http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_1_24.png) transparent no-repeat'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#blop').fadeIn(1600).delay(1500).fadeOut(1800,function(){$(this).remove();makeDiv18();});})();(function makeDiv19(){$newdiv=$('<div/>').css({'width':'167px','height':'167px','z-index':'21','background':'url(http://licor43.de/fileadmin/default/images/startseite_lichtpunkt_hell_2_24.png) transparent no-repeat'});$newdiv.css({'position':'absolute','left':(Math.random()*200).toFixed()+'px','top':(Math.random()*250).toFixed()+'px','display':'none'}).appendTo('#blop').fadeIn(1400).delay(1800).fadeOut(1400,function(){$(this).remove();makeDiv19();});})();}});
