
    //refreshes the page on screen resize
    $(window).bind('resize',function(){
     window.location.href = window.location.href;
    });
    
    //used to get ie to work
    $(window).load(function() {
        $(".square, .wide").each(function() {
          $(this).liquidCanvas("[shadow{color:#b6b6b6} fill{color:#fff}] => roundedRect{radius:8}");
        });
    });	
    
$(function(){
			
      //$(".sub").hide();
      $(".box").corner("5px");
      $(".nav h2").corner("5px tl, 5px tr");
      $(".sub .last").corner("5px bl, 5px br");		
      	
			var whichpath = window.location.pathname;
			var pagename = whichpath.substr(whichpath.lastIndexOf("/"));

			$("#menu li").click(function() {
        alert(whichpath);
        alert(pagename);
			});
			
			//grabs every brand occurance and adds span class
			var txtname = $("#wrapper");
			txtname.html(txtname.html().replace(/ariadnedesigns /gi,'Ariadne<span class="brandname">Designs </span>' ));
			
			//logo fade and show
			
			/* temp off until firefox 10 fixes bug
			$("#brand").delay(2000).fadeOut(3000);
			$("#logo").hover(function(){
                $("#brand").stop(true,true).fadeIn(1000);
			},function(){
                $("#brand").stop(true,true).fadeOut(1000);
			});
			*/
			
			//search box select
			/*
			$("input#searchWhat").focus(function(){
        $(this).select();
			});
			*/
		
			
			if ($("#news").length) {
          $("#news").cycle({
            fx:     'scrollUp',
            delay:  -2000,
            speed: 3000,
            timeout: 30000,
            cleartypeNoBg: true, //makes bg transparent(IE fix)
            pause: true
          }).hover(function(){
            $(".pause").show();
          },function(){
            $(".pause").hide();
          });
			}
			
			if($("a.lightbox").length) {
                //init lightbox js
                $("a.lightbox").lightBox();
			}
			//show and move icon tooltips
			$(".gra, .web, .fla, .mai, .dba, .int").hover(function(){
          var thisInfo = $(this).attr("class");
          var pos = $(this).offset();
          var myHeight = $(this).height();
          var myWidth = $(this).width();
          $("#" + thisInfo).show();
          $("#" + thisInfo).css({
              "left": ((pos.left + (myWidth / 2)) - 192) + "px" ,
              "top": ((pos.top - myHeight) - 105) + "px"});
			}, function() {
          var thisInfo = $(this).attr("class");
          $("#"+thisInfo).hide();
			});
			
			//menu hover slide			
			$("#menu li").hover(function() {  
				//show its submenu  
				$(this).addClass("active"); 
			}, function() {  
				//hide its submenu  
				$(this).removeClass("active");          
			});	
			
			if ($("#headlines").length) {
                $("#headlines .NewsListTitleLink").each(function() {
                    var newslink = $(this).attr("href");
                    var newstitle = $(this).text();
                    $("#banner").append('<div><h1 class="text"><a href="'+newslink+'" class="NewsListTitleLink">'+newstitle+'</a></h1></div>');
                    //$(".subnav").append('<li><a href="'+newslink+'"><span>'+newstitle+'</span></a></li>');
                });
			}
			
			//main page banner rotation
			$("#banner").cycle({
        timeout: 5000, 
        cleartypeNoBg: true //makes bg transparent(IE fix)
			});
			

});
