// JavaScript Document
/* Search Functions */

function submitQuickSearch() {
    var keyWords = document.getElementById('inpQuickSearch').value;
    document.location.href = document.location.href.split('?')[0] + '?tabid=5&keyword=' + keyWords;
}

function submitCategory() {
    var url = document.getElementById('selCategory').value;
    document.location.href = document.location.href.substr(0, document.location.href.indexOf('DesktopDefault.aspx')) + url;
}

function entsub(e) {
    var evt = window.event ? e.keyCode : e.which;
    var keyPressed = evt;

    if (keyPressed == 13) {
        submitQuickSearch();
        return false;
    } else {
        return true;
    }
}
//Menu
$(document).ready(function(){ 
	$(" .sub-menu").css({display: "none"});

	$(" .main-menu > li > a").click(function(){
		if ($(this).parent().find('.sub-menu:first').length > 0) {
			$(this).parent().find('.sub-menu:first').fadeIn(300);
			return false;
		}
	});

	$('ul.sub-menu-level2 > li > a').click(function(){
		if ($(this).parent().children('ul').length > 0) {
			$('ul.sub-menu-level2 > li').children('ul').fadeOut(400);
			$(this).parent().children('ul').fadeIn(400);
			return false;
		}
		
	});
if (document.location.href.indexOf("keyword") > -1) {
	$('.head-content').remove();
	}

$('.mask-intro').fadeOut(4500);

    $(function(){
    $("ul#ticker01").liScroll();
    }); 
});



