$(function() {
    
    $("textarea").attr("style","");
    $(".MMDataCaptureForm_ErrorTD span").attr("style","");
    
    var blogContent = $(".blogFeed").html();
        $("#blogFeed").html(blogContent);
        $("#blogFeed li:last").attr("style","border: none;");
        $("#blogFeed li:first").attr("style","border-bottom: 1px solid #181308;");
        
        $("#gallery_container .gallery_content:nth-child(1)").show();
   
   
   $(".recent_project:nth-child(1)").click(function(){
        $("#gallery_container .gallery_content:nth-child(1)").hide();
   });
   
   $(".paging a").each(function(){
        var getStyle = $(this).attr("style");
        if (getStyle=="font-weight: bold; text-decoration: underline;") {
            $(this).css("color","#fff").css("text-decoration","none");
        }
    });
    
    
    $(".home_panels p:first").attr("style","height: 32px;");
    $("#gallery_container div").attr("style","");
    
    $(".recent_projects img").css("-moz-opacity","1").css("filter","alpha(opacity=100)");
   
    $(".recent_projects img").click(function(){
    }).hover(function(){
        $(this).animate({ opacity: 0.6  }, 250);
    },function(){
        $(this).animate({ opacity: 1 }, 250);
    });
    
    var urlnav = window.location;
    $(".recent_projects a[href$="+urlnav+"] img").css("-moz-opacity","0.6").css("filter","alpha(opacity=60)").addClass("active");
    
    $(".active").click(function(){
    }).hover(function(){
        $(this).animate({ opacity: 0.6 }, 60);
    },function(){
        $(this).animate({ opacity: 0.6 }, 60);
    });
    
    if ($("#gallery_container").is(":visible")) {
        $("#content").css("border-top","1px solid #120a02");
    }

$(".gallery_left .Phuse_PanelAreaRow").attr("style"," float: left;");
$(".gallery_left .Phuse_PanelContainingDiv").attr("width","").attr("style"," float: left;");
$(".gallery_left table div").attr("style","").attr("width","");
$(".gallery_left .slideViewer").attr("style","float: left;");
$(".gallery_left .slideViewer div").attr("style","float: left;");
$(".gallery_left .slideViewer div ul").attr("style","float: left;");
$(".gallery_left ul table").attr("style","float: left; width:349px; ");
    
    var thisUrl = location.hostname;
    if (thisUrl=="www.hipentertainment.co.uk") {
        $(".you_tube a").each(function(){
            var url = $(this).attr("href");
            var urlLength = url.length;
            var charLength = eval(urlLength-11);
            var getCode = url.slice(charLength,urlLength);
            $(this).html("<object width=\"479\" height=\"388\"><param name=\"movie\" value=\"http://www.youtube.com/v/"+getCode+"\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/"+getCode+"\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"479\" height=\"388\"></embed></object>");
        });
    }
   
});