jQuery(document).ready(function(){
	//PNGS ?
	jQuery('body').pngFix( );
	
	jQuery('h2.widgettitle').hide();
	
	var cat = window.location.href;
	if(cat == 'http://www.ostmodern.co.uk/') {
		jQuery('#all').addClass('active_filter');
	};
	if(cat == 'http://www.ostmodern.co.uk/?cat=4') {
		jQuery('#news').addClass('active_filter');
	};
	if(cat == 'http://www.ostmodern.co.uk/?cat=3') {
		jQuery('#thinking').addClass('active_filter');
	};
	if(cat == 'http://www.ostmodern.co.uk/?cat=5') {
		jQuery('#work').addClass('active_filter');
	};
	
	//MONTHS
	var date = document.URL.indexOf('?m=');
	if (date != -1) {		
		
		var getDate = document.URL.substring(date+3, document.URL.length);
		var year = getDate.substring(0,4);
		var month = parseInt(getDate.substring(+4));
		
		var months = new Array(12);
		
		months[01] = "January";
		months[02] = "February";
		months[03] = "March";
		months[04] = "April";
		months[05] = "May";
		months[06] = "June";
		months[07] = "July";
		months[08] = "August";
		months[09] = "September";
		months[10] = "October";
		months[11] = "November";
		months[12] = "December";
		
		jQuery('h4#clickMe').html(months[month] + '&nbsp;' + year);
		
	}
	
	
	//TAGS
	var tag = document.URL.indexOf('?tag=');
	if (tag != -1) {
		var getTag = document.URL.substring(tag+5, document.URL.length);
		jQuery('li#ost_blog_filter')
			.html('<h4>Showing Tag: ' + '<span class="theTag">' + getTag + '</span>' + '<a href="/" id="removeTag">REMOVE</a>')
			.addClass('tagContent')
		;
	}
	
	//DROPDOWN
	jQuery('li#monthly_dropdown').css('overflow','hidden');
	
	//FONT SIZE FOR WORK WUITH US
	/*
	if(cat == 'http://www.ostmodern.co.uk/?page_id=3') {
		jQuery('li.page_col_1 p').css('font-size','18' + 'px');
	};
	*/
	
	//AUTHOR LINK HEIGHT
	var authorLink =jQuery('div.post h2').height();
	var extraHeight = 12;
	jQuery('div.entry small').css('height', authorLink + extraHeight);
	
	jQuery('h4#clickMe').bind('click',function() {
		var setHeight = jQuery('#monthly_dropdown').height();
		var dropdown = jQuery('#archive_list').height();
		if(setHeight > 50) {
			jQuery('#monthly_dropdown').animate({height: '39'});
			setTimeout(function() {
				jQuery('li#monthly_dropdown').removeClass('borders');
			}, 1000);
		} else {
			jQuery('#monthly_dropdown').animate({height: setHeight + dropdown});
			jQuery('li#monthly_dropdown').addClass('borders');
		}
	});
	
});






