/**
 * Author => Company       : Prodo Ltd
 * Author => Email         : chris@prodo.com
 * Author => Name          : Christopher Robinson
 * Author => Website       : http://www.prodo.com
 * Code   => Last Modified : 20 May 2009
 */

$(document).ready(function() {
	
	$('a[rel=external]').click(function(e) {
		open(this.href);
		e.preventDefault();
	}).attr('title', 'Opens in a new window');
	
	if($('#homepage .page_image')) {
		$('#homepage .page_image').flash({
			src    : '/App_Themes/meetinchesterandcheshire/animation_homepage.swf',
			width  : 600,
			height : 240
		});
	}
	
	$('li.newsletter-sign-up a').click(function(e) {
		$('.newsletter').toggle();
		e.preventDefault();
	});
	
	$('#newsletter-sign-up_close').click(function(e) {
		$('.newsletter').hide();
		e.preventDefault();
	});
	
	// Cart
	$('.cart ul li.view').css('display', 'block').click(function(e) {
		e.preventDefault();
		$('.cart-items').slideToggle(1000);
	});

	// I-Venue Search Form
	$('.i-venue-search ul li.view').css('display', 'block').click(function(e) {
	    e.preventDefault();
	    $('.search-items').slideToggle(1000);
	});
	
	
	
	
	
	// Font Size
	$(".font-size").show();
	
	var originalFontSize = $('#content .main').css('font-size');
	
	$(".font-size .reset").click(function(e) {
		$('#content .main').css('font-size', originalFontSize);
		e.preventDefault();
	});
	
	$(".font-size .increase").click(function(e) {
		$('#content .main').css('font-size', parseFloat($('#content .main').css('font-size'), 10) * 1.1);
		e.preventDefault();
	});
	
	$(".font-size .decrease").click(function(e) {
		$('#content .main').css('font-size', parseFloat($('#content .main').css('font-size'), 10) * .9);
		e.preventDefault();
	});
});