$(document).ready(function(){

//DROPDOWN MENU INIT
ddsmoothmenu.init({
mainmenuid: "mainMenu", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
//customtheme: ["#1c5a80", "#18374a"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
});


// PRETTY PHOTO INIT
$("a[rel^='prettyPhoto']").prettyPhoto();

// SHOW/HIDE FOOTER ACTIONS
$('#showHide').click(function(){	
	if ($("#footerActions").is(":hidden")) {
		$(this).css('background-position','0 0');
		$("#footerActions").slideDown("slow");
		
		} else {
		$(this).css('background-position','0 -16px') 
		$("#footerActions").hide();
		$("#footerActions").slideUp("slow");
		}
	return false;			   
});		

// TOP SEARCH 
$('#s').focus(function() {
		$(this).animate({width: "215"}, 300 );	
		$(this).val('')
});

$('#s').blur(function() {
		$(this).animate({width: "215"}, 300 );
});

// QUICK CONTACT

$('#quickName').val('your name');
$('#quickEmail').val('your email');
$('#quickComment').val('your message');

$('#quickName').focus(function() {
		$(this).val('');	
});

$('#quickEmail').focus(function() {
		$(this).val('');	
});

$('#quickComment').focus(function() {
		$(this).val('');	
});

//SHARE LINKS
$('#shareLinks a.share').click(function() {
		if ($("#shareLinks #icons").is(":hidden")) {
		$('#shareLinks').animate({width: "625"}, 500 );
		$('#shareLinks #icons').fadeIn();
		$(this).text('[-] Share & Bookmark');
		return false;
		}else {
		$('#shareLinks').animate({width: "130"}, 500 );
		$('#shareLinks #icons').fadeOut();
		$(this).text('[+] Share & Bookmark');
		return false;	
		}
});

//auto height arras style
bks=$("#homeBoxes").attr("nbb");
hmax1=0;
hmax2=0;
hmax3=0;
hmax4=0;
hmax5=0;
cpt=0;
$('#homeBoxes .homeBox h2').each(function(i){
	cpt++;
	if(cpt<=bks){
		$(this).addClass("edit1");
		h= $(this).height();
		if(h>hmax1){
			hmax1=h;
		}
	}
	if(cpt<=(bks*2) && cpt>bks){
		$(this).addClass("edit2");
		h= $(this).height();
		if(h>hmax2){
			hmax2=h;
		}
	}
	if(cpt<=(bks*3) && cpt>(bks*2)){
		$(this).addClass("edit3");
		h= $(this).height();
		if(h>hmax3){
			hmax3=h;
		}
	}
	if(cpt<=(bks*4) && cpt>(bks*3)){
		$(this).addClass("edit4");
		h= $(this).height();
		if(h>hmax4){
			hmax4=h;
		}
	}
	if(cpt<=(bks*5) && cpt>(bks*4)){
		$(this).addClass("edit5");
		h= $(this).height();
		if(h>hmax5){
			hmax5=h;
		}
	}
	
});

$('.edit1').each(function(i){
	$(this).css("height", hmax1);
	$(this).removeClass("edit1");
});
$('.edit2').each(function(i){
	$(this).css("height", hmax2);
	$(this).removeClass("edit2");
});
$('.edit3').each(function(i){
	$(this).css("height", hmax3);
	$(this).removeClass("edit3");
});
$('.edit4').each(function(i){
	$(this).css("height", hmax4);
	$(this).removeClass("edit4");
});
$('.edit5').each(function(i){
	$(this).css("height", hmax5);
	$(this).removeClass("edit5");
});

larR=$(".img_promo").find("img").attr("width");
larG=$("#colLeft").width();
larL=larG-larR-120;
$(".promoLeft").css("width", larL);

// Fix Bg fff
$("#postWrapper div:first").next().next().css("background", "none");
$("#postWrapper").find ("td").css("background", "none");
$("#postWrapper").find ("table").css("background", "none");
$(".timg td:first").next().find("img").css("display", "none");




});
<!-- end document ready -->

<!-- PrettyPhoto init -->


