	function setCookie( name, value, expires, path, domain, secure ) {
    var today = new Date();
    today.setTime( today.getTime() );
    if ( expires ) {
        expires = expires * 1000;
    }
    var expires_date = new Date( today.getTime() + (expires) );
    [removed] = name+'='+escape( value ) +
        ( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) + //expires.toGMTString()
        ( ( path ) ? ';path=' + path : '' ) +
        ( ( domain ) ? ';domain=' + domain : '' ) +
        ( ( secure ) ? ';secure' : '' );
	}
	
	$(document).ready(function () {
	

	
	$('.pricing-modal').click(function (e) {
		e.preventDefault();
		$('#pricing').modal();
		
	});
	
	$('.conversion-modal').click(function (e) {
		e.preventDefault();
		$('#conversion').modal();
	});
	
	$('.buy-modal').click(function (e) {
		e.preventDefault();
		$('#store-buy').modal();
		$('#simplemodal-overlay').show();
		$('#simplemodal-container').show();
	});
	
	
	$('#gallery').cycle({ 
	    fx:     'fade', 
	    speed:  'fast', 
	    timeout: 0, 
	    next:   '#next', 
	    prev:   '#prev' 
	});
	
	
	$('.choose-store').click(function (e) {
		e.preventDefault();
		$('#store-buy').modal();
	});
	
	$('input[name=tandc]').attr('checked', false);
	
	$('ul.terms').hide();
	
	$('input.tandc').click(function () {
		$('ul.terms').slideDown('slow');
	});
	
	$('#order-forms').hide();
	
	$('input.order_tandc').click(function () {
		$('#order-forms').slideDown('slow');
	});

	$('#prod1').hover(function(){
       $('#prod2,#prod3,#prod4').stop().fadeTo('slow', 0.33);
   	},function(){
       $('#prod2,#prod3,#prod4').stop().fadeTo('fast', 1);

	});
	
	$('#prod2').hover(function(){
       $('#prod1,#prod3,#prod4').stop().fadeTo('slow', 0.33);
   	},function(){
       $('#prod1,#prod3,#prod4').stop().fadeTo('fast', 1);

	});
	
	$('#prod3').hover(function(){
       $('#prod2,#prod1,#prod4').stop().fadeTo('slow', 0.33);
   	},function(){
       $('#prod2,#prod1,#prod4').stop().fadeTo('fast', 1);

	});
	
	$('#prod4').hover(function(){
       $('#prod2,#prod3,#prod1').stop().fadeTo('slow', 0.33);
   	},function(){
       $('#prod2,#prod3,#prod1').stop().fadeTo('fast', 1);

	});
});


