    $(document).ready(function() {
        $.fn.hoverClass = function(c){
            return this.each(function(){
                var config = {
                     sensitivity: 7,
                     interval: 10,
                     over: function(){ $(this).addClass(c); },
                     out: function(){ $(this).removeClass(c); },
                     timeout: 50
                };
                $(this).hoverIntent(config);
            });
        };
        
        $("#nav li").hoverClass("sfHover");

        $("#nav li#kredyt").mouseover(function(){
            $("<div class=\"selectDiv\" ></div>").insertBefore("select#type, select#make, select#model");
            $("select#type, select#make, select#model").hide();
        });
        
        $("#nav li#kredyt").mouseout(function(){
            $("div.selectDiv").remove();
            $("select#type, select#make, select#model").show();
        });
        
        var popContactForm = false;
        $("a.jsPopup").click(function(event){
            event.preventDefault();
            var targetURL = $(this).attr('href');
            if (!popContactForm) {
                var popContactForm =  window.open(targetURL,'','height=300,width=300');    
            } else {
                popContactForm.focus();
            }
            
          });
          
         $(".gePopup").click(function(event){
            event.preventDefault();
            var targetURL = $(this).attr('href');
            if (!popContactForm) {
                var popContactForm =  window.open(targetURL,'','height=600,width=740, resizable = no, scrollbars=yes');    
            } else {
                popContactForm.focus();
            }
            
          }); 
          var max = 0;
         $("#frontPageContainer .box1_3 .boxContent").each(function() {
					if(max==0) max = $(this).height();
					else if(max<$(this).height()) max = $(this).height();
				});
         $("#frontPageContainer .box1_3 .boxContent").height(max);
    });
