Shadowbox.loadSkin('classic', 'http://vevusa.com/js/skin');
Shadowbox.loadLanguage('en', 'http://vevusa.com/js/lang');
Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img'], 'http://vevusa.com/js/player');


$(document).ready(function(){
 	$("div#caption").addClass("clearfix");
 	$("div.breadcrumbs").css({display:"block"});
 	$("div.hid").hide();
 	//$('#vidlib ul').jScrollPane({showArrows:true, scrollbarWidth:6, scrollbarMargin:0});
 	//$("#s1").cycle();
 	$("div#ship").html("<form action='http://search.store.yahoo.net/cgi-bin/nsearch?unique=30516&catalog=yhst-21189662903333' method='post' name='vw-form'><fieldset><input type='hidden' value='yhst-21189662903333' name='vwcatalog' /><input type='hidden' value='49e48bb6' name='et' /><input type='hidden' value='1239614742' name='vwentropy' /><label for='query'>search</label><input type='text' title='search&#8230;' class='text' id='query' name='query' /><button id='search' type='submit'>search</button></fieldset></form>");
	$("div#container").append("<ul id='nav'><li><a id='home' title='home' rel='nofollow' href='http://store.casasolo.com'>home</a></li><li><a title='customer service' rel='nofollow' href='info.html'>customer service</a></li><li><a rel='shadowbox;height=600;width=800 nofollow' title='Contact VeV USA Ltd.' href='http://vevusa.com/fs/index.php?bg=casasolo'>contact us</a></li><li><a title='search' rel='nofollow' href='nsearch.html'>search</a></li><li><a title='checkout' rel='nofollow' href='https://us-dc1-order.store.yahoo.net/cgi-bin/wg-order?yhst-21189662903333'>shopping cart</a><span style='padding:0 14px 0 0;'>&#32;</span></li></ul>");
	$("div#header").append("<div style='position:absolute; top:40px; left:630px;'><a rel='shadowbox nofollow' title='McAfee Secure Seal' href='https://www.scanalert.com/RatingVerify?ref=store.casasolo.com'><img src='http://images.scanalert.com/meter/store.casasolo.com/12.gif' width='115' height='32' alt='secure'></a></div>");
	$("div#signup").html("<fieldset><legend>Subscribe<span>&#32;</span></legend><form id='subscribe' method='get' action='http://vevusa.com/fs/mcapi/index.php'><label for='email'>email</label><input type='text' id='email' name='email' title='enter email&#8230;' /><button type='submit' id='submit' title='subscribe'>submit</button></form><p></p></fieldset>");
	$("div#footer_text").html("<ul><li><a rel='nofollow' href='http://store.casasolo.com/'>home</a></li><li><a rel='nofollow' href='https://us-dc1-order.store.yahoo.net/cgi-bin/wg-order?yhst-21189662903333'>view cart</a></li><li><a rel='nofollow' href='info.html'>customer service</a></li><li><a rel='nofollow' href='ind.html'>site map</a></li><li><a rel='shadowbox nofollow'href='http://vevusa.com/w3c/'>privacy policy</a></li></ul><p>&copy;2009 VeV USA Ltd. All Rights Reserved</p>");
	//$("#welcome").animate({opacity: "1.0", filter: "alpha(opacity = 100)"}, 3000 );
	$("h1, h5").click(function() {	
	window.location=$(this).find("a").attr("href"); return false;
	});
	$("a[href*=.pdf]").click(function(){
	window.open(this.href);
	return false;
	});
	$("li#espresso-makers span").click(function() {
	window.location = "espresso-makers.html";
	});
	$("li#espresso-machines span").click(function() {
	window.location = "espresso-machines.html";
	});
	$("li#pasta-makers span").click(function() {
	window.location = "pasta-machines.html";
	});
	$("li#meat-grinders span").click(function() {
	window.location = "meat-grinders.html";
	});
	$("li#food-millsm span").click(function() {
	window.location = "food-strainers.html";
	});
	$("li#kitchen-gadgets span").click(function() {
	window.location = "kitchen-gadgets.html";
	});
});

$(document).ready(function() {
  //Shadowbox.init({skipSetup:true});
  var fm = $('#subscribe').bind('submit',function(e){
    var fld = [];
    $('input',fm).not('[type=submit]').each(function(){
      fld.push(this.name+'='+$(this).val().replace(/^#/,''));
    });
    var url = fm.attr('action')+'?'+fld.join('&');
    Shadowbox.open({player:'iframe',content:url,width:600,height:400,title:'Please Confirm'});
    fm[0].reset();
    return false;
  });
});

$(document).ready(function(){
	var options = {
	resizeLgImages:     true, loadingImage: "http://vevusa.com/images/loading.gif",
	displayNav:         true, handleUnsupported:  'remove',
	keysClose:          ['c', 27], // c or esc
	autoplayMovies:     true
		    };
	Shadowbox.init(options);
});

//for open shadowbox from flash
var openSB = function(content, player, title, height, width){
	Shadowbox.init({skipSetup: true});
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title,
        height:		height,
        width:		width
    });
};

$(document).ready(function(){ 
				$('input:text').hint();
			})
			
			jQuery.fn.hint = function() {
				return this.each(function(){
					var t = $(this); // get jQuery version of 'this'
					var title = t.attr('title'); // get it once since it won't change
					
					if (title) { // only apply logic if the element has the attribute
						
						// on focus, set value to blank if current value matches title attr
						t.focus(function(){
							if (t.val() == title) {
							  t.val('');
							  t.removeClass('blur');
							}
						})

						// on blur, set value to title attr if text is blank
						t.blur(function(){
							if (t.val() == '') {
							  t.val(title);
							  t.addClass('blur');
							}
						})

						// now change all inputs to title
						t.blur();
					}
				})				
}