$(document).ready(function(){

//Leveling by Height
$.fn.setEqualBlocksHeight=function(count){if(count=='all'||count>this.length)count=this.length;count=parseInt(count);if(count>1)
{this.css({height:'auto','min-height':0});for(var i=1;i<=this.length;i+=count)
{var sameH=0;for(var j=0;j<=count-1;j++)
{if(this.get(i+j-1))
{var blockH=this.eq(i+j-1).height();sameH=(blockH>sameH)?(sameH=blockH):sameH}}
for(var j=0;j<=count-1;j++)
{if(this.get(i+j-1))
{this.eq(i+j-1).css({'min-height':sameH});if($.browser.msie&&$.browser.version=='6.0')this.eq(i+j-1).height(sameH)}}}};if(count==1)this.css({height:'auto','min-height':0});return this};

$('.l-home-pods li').setEqualBlocksHeight('all');
$('.nav-bottom > li').setEqualBlocksHeight('all');
	
//Element hover 
$('input[type=submit]').each(function(){	
	var el = $(this).attr('class');
	$(this).hover(function(){$(this).addClass(el + '-hover');}, function(){$(this).removeClass(el + '-hover');});
});


$(".lightbox").each(function(){
	$(this).fancybox({    
	'transitionIn'	: 'elastic',
	'transitionOut'	: 'elastic'   
	});
});
	
});


function submitenterSearch(myfield, e, controlName) {   
    var keycode;
    if (window.event)
        keycode = window.event.keyCode;
    else if (e)
        keycode = e.which;
    else
        return true;
    if (keycode == 13) {
        var btn = jQuery("input[id*='" + controlName + "']");
        btn.click();
        return false;
    }
    else
        return true;
}

