$(document).ready(function(){


    $(".servList h2").each(function(){
        if ( $(this).parent().attr('id')==$.cookie('collaps_'+$(this).parent().attr('id')) ) {
            $(this).parent().children('ul').slideToggle(0);
            $(this).parent().addClass("collapsed");
        }
    });

    $(".servList h2").click(
        function () {
            $(this).parent().children('ul').slideToggle(200);
            $(this).parent().toggleClass("collapsed");
            if ($(this).parent().hasClass('collapsed')) {
                $.cookie('collaps'+'_'+$(this).parent().attr('id'), $(this).parent().attr('id'));
            } else {
                $.cookie('collaps'+'_'+$(this).parent().attr('id'), '', {
                    expires: -1
                });
            }

        }
        );
            
    $(".collapseBlock h4").click(
        function () {
            $(this).parent().children('.cont').slideToggle(200);
            $(this).parent().toggleClass("collapsed");
        }
        );
    /*
	var cusSelN = 1;
     $(".customSelect").each(function(){
          $(this).attr("id", "cusSelect"+cusSelN);
          $("body").append("<script type='text/javascript'>new Select('cusSelect"+cusSelN+"', {dropDownSize: 15});</script>")
          cusSelN += 1;
     });
*/
    $("input.hand").hover(
        function () {
            $(this).addClass("butt-hover");
        },
        function () {
            $(this).removeClass("butt-hover");
        }
        );

})



function noselect(){
    sel=window.getSelection();
    sel.removeAllRanges();
    setTimeout("noselect()", 10);
}
/*
function showAlert(){
    alert("Right clicks and text selection disabled!");
}

function Demo(){
    noselect();

if (typeof document.body.onselectstart != "undefined") //IE route
    document.body.onselectstart=function(){return false};
else if (typeof document.body.style.MozUserSelect != "undefined") //Firefox route
    document.body.style.MozUserSelect="none";
else //All other route (ie: Opera)
    document.body.onmousedown=function(){return false}
    document.body.style.cursor = "default";


    function clickIE4(){
        if (event.button == 2){
                return false;
            }
	}

        function clickNS4(e){
            if (document.layers||document.getElementById&&!document.all){
                if (e.which == 2||e.which == 3){
                    return false;
		}
            }
	}
	if (document.layers){
            document.captureEvents(Event.MOUSEDOWN);
            document.onmousedown=clickNS4;
	}
	else if (document.all && !document.getElementById)
            document.onmousedown=clickIE4;
            document.oncontextmenu=new Function("setTimeout('showAlert()',1);return false")
	}
*/

