$(function() {
	$("html div:last").css({'display' : 'none'});
	$(".gallery a").fancybox();

// DONT FUCK WITH MY SHIT!!!

$(".catbutton").click(function(){
	$(".dropdownpanel").animate({top: "450px"}, { duration: 500, queue: false });
    //  $(this).toggleClass("active");
});
						   
$(".dropdownpanel").bind("mouseleave",function(){
	  $(".dropdownpanel").animate({top: "0px"}, { duration: 500, queue: false });

});	

$(".gamebutton").click(function(){
	$(".dropdowngamespanel").animate({top: "450px"}, { duration: 500, queue: false });
    //  $(this).toggleClass("active");
});
						   
$(".dropdowngamespanel").bind("mouseleave",function(){
	  $(".dropdowngamespanel").animate({top: "0px"}, { duration: 500, queue: false });

});

$(".ringtonesbutton").click(function() {
    $(".dropdownringtonespanel").animate({ top: "450px" }, { duration: 500, queue: false });
    //  $(this).toggleClass("active");
});

$(".dropdownringtonespanel").bind("mouseleave", function() {
    $(".dropdownringtonespanel").animate({ top: "0px" }, { duration: 500, queue: false });

});	


  $(".common .details p:odd").css("background-color", "transparent");
  $(".common .details p:even").css("background-color", "#538ccf");
  
   $("#profileContent .box div:odd").css("background-color", "transparent");
  $("#profileContent .box div:even").css("background-color", "#eee");

	
$("#ctl00_sopt li ul").addClass("jqhide");

$("#ctl00_sopt li").hover(
   	function() {
   	    $(this).children("ul").slideDown();
   	},
	function() {
	    $(this).children("ul").slideUp();
});

//$("input[type='hidden']").css("","");

$("idplease").click(function() {
        if ($("#sysmessage").is(":hidden")) {
            $("#sysmessage").slideDown(200);
        } else {
            $("#sysmessage").slideUp(200);
        }
});

$(".sopt").bind("click", function() {
        $("#pagefilter").slideToggle(200);
});

$(".adv").bind("click", function() {
        $("#advsearch").slideToggle(200);
        $(".adv").hide();
});
	
$(".adv_").bind("click", function() {
        $("#advsearch").slideToggle(200,function(){
        $(".adv").show();});
});
	
var path = location.pathname.substring(1);
    if (path)
    $('#textlinks a[@href$="' + path + '"]').attr('class', 'selected');
});
	$(".details td:nth-child(1)").addClass("header");
/* 
Derived from a script by Alejandro Gervasio. 
Modified to work in FireFox by Stefan Mischook for Killersites.com

How it works: just apply the CSS class of 'column' to your pages' main columns.
*/
matchColumns=function(){ 

     var divs,contDivs,maxHeight,divHeight,d; 
	
     // get all <div> elements in the document 

     divs=document.getElementsByTagName('div'); 

     contDivs=[]; 

     // initialize maximum height value 

     maxHeight=0; 

     // iterate over all <div> elements in the document 

     for(var i=0;i<divs.length;i++){ 

          // make collection with <div> elements with class attribute 'container' 

          if(/\bcolumn\b/.test(divs[i].className)){ 

                d=divs[i]; 

                contDivs[contDivs.length]=d; 

                // determine height for <div> element 

                if(d.offsetHeight){ 

                     divHeight=d.offsetHeight; 					

                } 

                else if(d.style.pixelHeight){ 

                     divHeight=d.style.pixelHeight;					 

                } 

                // calculate maximum height 

                maxHeight=Math.max(maxHeight,divHeight); 

          } 

     } 

     // assign maximum height value to all of container <div> elements 

     for(var i=0;i<contDivs.length;i++){ 

          contDivs[i].style.height=maxHeight + "px"; 

     } 

} 

// Runs the script when page loads 

window.onload=function(){ 

     if(document.getElementsByTagName){ 

          matchColumns();			 

     }

 }

 $(document).ready(function() {
     $("#submitSection").hover(function() {
         var title = $("#ctl00_ContentPlaceHolder1_title").val();
         var desc = $("#ctl00_ContentPlaceHolder1_description").val();
         title = title.replace(/\</ig, ' ');
         title = title.replace(/\>/ig, ' ');         
         desc = desc.replace(/\</ig, ' ');
         desc = desc.replace(/\>/ig, ' ');
         $("#ctl00_ContentPlaceHolder1_title").val(title);
         $("#ctl00_ContentPlaceHolder1_description").val(desc);
     });
 });


