//window.addEventListener?window.addEventListener("load",init,false):window.attachEvent("onload",init);
$(document).ready(function(){
	//$("h2 strong").dropShadow({left: 2, top: -10, blur: 1});
	//$(".modelimage").dropShadow();

	if (document.getElementById('image')) {
		$('#image').cycle({ 
		fx:    'fade', 
		speed:  2000,
		timeout: 8000,
		random: 1
		});
	}
						   
	if (document.body.id == "videojump") {
	$.scrollTo('620px', 1000);	
	}
	
	
});

function closeoffer(offer) {
	$('#theoffer').fadeOut();
	setCookie('modeloffer'+offer, 'hide');
}


function ratehover (rate) {
	for (var i=1; i<=10; i++) {
		if (i<=rate) {
			document.getElementById('rate'+i).className = 'hover';	
		} else {
			document.getElementById('rate'+i).className = '';	
		}
	}
}

function setrating(vid,gid,rating) {

	jQuery.get("?action=rate&vid="+vid+"&gid="+gid+"&rate="+rating, function(data){
  		alert(data);
	});

	return false;
} 

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
