﻿$(document).ready(function() {

    $("#top1sub li:last").css({ border: 'none' });

    $("#top2sub li:last").css({ border: 'none' });

//$("#top3sub li:nth-child(7) a").css({ paddingRight:'34px'});

//$(".left_menu_ul li:first").css({ borderTop:'1px dotted gray'});

$("#footer_menu li:last").css({ border:'none'});




$("#top3sub li").hover(
  function () {
 if($(this).children("a").html() == "For Schools")
 {
 $(this).children(".top_submneu").css({ marginLeft:'-365px'});
 }
 

 
 if( $(this).children("a").html() == "About the Guild" )
 {
 $(this).children(".top_submneu").css({ marginLeft:'-15px'});
 }
 
    $(this).children(".top_submneu").css({ display:'block'});
  },
  function () {
    $(this).children(".top_submneu").css({ display:'none'});
  }
);



function getCookie(c_name) {
    if (document.cookie.length > 0) {
        c_start = document.cookie.indexOf(c_name + "=");
        if (c_start != -1) {
            c_start = c_start + c_name.length + 1;
            c_end = document.cookie.indexOf(";", c_start);
            if (c_end == -1) c_end = document.cookie.length;
            return unescape(document.cookie.substring(c_start, c_end));
        }
    }
    return "";
}


$(document).ready( function(){ 
	$('#home-flash-list').innerfade({ speed: 1000, timeout: 8000, type: 'sequence', containerheight: '446px'}); 
});

$(document).ready( function(){ 
	$('#travel-flash-list').innerfade({ speed: 1000, timeout: 8000, type: 'sequence', containerheight: '246px'}); 
});


});

function fontzoom()
{
//alert("AA");
document.body.style.zoom = "200%";
}
function GoToSearch(Field, e) {
    if (e.keyCode == 13) {
        window.location = "/guild/templates/Search.aspx?keywords=" + Field.value;
        //alert(Field.value);
    }
}

function FontSmaller() {
    var currentFontSize = $("#FontWrap").css("font-size");
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum / 1.2;
    $("#FontWrap").css("font-size", newFontSize);
    $("#FontWrap b").css("font-size", newFontSize);
    $("#FontWrap p").css("font-size", newFontSize);
    $("#FontWrap h2").css("font-size", newFontSize);
    //setCookie("fontsize", newFontSize, 1);

//    var currentFontSize = $("#leftcolumn").css("font-size");
//    var currentFontSizeNum = parseFloat(currentFontSize, 10);
//    var newFontSize = currentFontSizeNum * 1.2;
//    $("#leftcolumn p").css("font-size", newFontSize);
//    $("#leftcolumn").css("font-size", newFontSize);
//    if (currentFontSizeNum > 0) {
//        setCookie("fontsize", newFontSize, 1);
        //alert(currentFontSize);
   // }
}

function FontLarger() {
    var currentFontSize = $("#FontWrap").css("font-size");
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum * 1.2;
    $("#FontWrap").css("font-size", newFontSize);
    $("#FontWrap").css("line-height", newFontSize + "px");
    $("#FontWrap b").css("font-size", newFontSize);
    $("#FontWrap p").css("font-size", newFontSize);
    $("#FontWrap h2").css("font-size", newFontSize);
    //setCookie("fontsize", newFontSize, 1);

//    var currentFontSize = $("#leftcolumn").css("font-size");
//    var currentFontSizeNum = parseFloat(currentFontSize, 10);
//    var newFontSize = currentFontSizeNum * 1.2;
//    $("#leftcolumn p").css("font-size", newFontSize);
//    $("#leftcolumn").css("font-size", newFontSize);
//    if (currentFontSizeNum > 0) {
//        setCookie("fontsize", newFontSize, 1);
        //alert(currentFontSize);
   // }
}

function FontDefault() {
    $("#FontWrap").css("font-size", "12px");
    $("#FontWrap").css("line-height", "18px");
    $("#FontWrap p").css("font-size", "12px");
    $("#FontWrap b").css("font-size", "12px");
    $("#FontWrap h2").css("font-size", "12px");

    //$("#leftcolumn").css("font-size", "12px");
    //$("#leftcolumn p").css("font-size", "12px");
    //setCookie("fontsize", 12, 1);
}

function setsize(size) {
    $("#intcentercolumn").css("font-size", size + "px");
    $("#intcentercolumn p").css("font-size", size + "px");
    $("#intcentercolumn b").css("font-size", size + "px");
    $("#intcentercolumn h2").css("font-size", size + "px");

    $("#leftcolumn").css("font-size", size + "px");
    $("#leftcolumn p").css("font-size", size + "px");
}
